<%@ Page Title="Member_Config Item" Language="C#" AutoEventWireup="true" CodeBehind="Member_ConfigItem.aspx.cs" Inherits="Youz.CreditRepay.Manage.Member_ConfigItem" %>
<script>
    

    var requireJS = [
        //"assets/js/jquery.form.js"
    ];
    loadJS(requireJS);
</script><div class="row"><div class="col-lg-12"><div class="panel panel-default"><div class="panel-heading"><h2><i class="fa fa-edit"></i><%: R(LanguageModule.Member_Config, "Member_Config", "Member_Config") %></h2></div><div class="panel-body"><form id="frm" class="form-horizontal" method="post" enctype="multipart/form-data" action="Right/Handlers/Member_ConfigHandler.ashx?type=save"><input id="MemberAccount" name="MemberAccount" type="hidden" />
<div class="form-group">
<label class="control-label" for="RoleDesc"><%: R(LanguageModule.Member_Config, "ConfigKey", "配置Key(Login:登录交易平台时接受系统邮件的通知,Recharge:账户资金充值时接受系统邮件的通知,Withdraw:资") %></label>
<div class="controls"><input type="text" id="ConfigKey" name="ConfigKey" maxlength="200" class="form-control required" /></div>
</div>
<div class="form-group">
<label class="control-label" for="RoleDesc"><%: R(LanguageModule.Member_Config, "ConfigValue", "配置Value") %></label>
<div class="controls"><input type="text" id="ConfigValue" name="ConfigValue" maxlength="200" class="form-control required" /></div>
</div>
<div class="form-group">
<label class="control-label" for="RoleDesc"><%: R(LanguageModule.Member_Config, "Memo", "备注 ") %></label>
<div class="controls"><textarea id="Memo" name="Memo" rows="3" maxlength="1000" class="form-control"></textarea></div>
</div>
<div class="form-group">
<label class="control-label" for="RoleDesc"><%: R(LanguageModule.Member_Config, "CreateTime", "创建时间") %></label>
<div class="controls"><input type="text" id="CreateTime" name="CreateTime" maxlength="8" class="form-control required" /></div>
</div>
<div class="form-group">
<label class="control-label" for="RoleDesc"><%: R(LanguageModule.Member_Config, "Modifier", "修改人") %></label>
<div class="controls"><input type="text" id="Modifier" name="Modifier" maxlength="200" class="form-control" /></div>
</div>
<div class="form-group">
<label class="control-label" for="RoleDesc"><%: R(LanguageModule.Member_Config, "ModifyTime", "修改时间") %></label>
<div class="controls"><input type="text" id="ModifyTime" name="ModifyTime" maxlength="8" class="form-control" /></div>
</div>
<div class="alert alert-danger" style="display: none;"><button type="button" class="close" data-dismiss="alert">×</button><strong>Oh snap!</strong><span class="content"></span></div><div class="form-actions"><button class="btn btn-success" type="submit" id="btnSubmit"><%: R(LanguageModule.M_Common, "btnSubmit", "保存修改") %></button>
						<button class="btn btn-default" type="button" id="btnCancel"><%: R(LanguageModule.M_Common, "btnCancel", "取消") %></button></div></form></div></div></div></div><script type="text/javascript">

    var flag = false;

    function validate() {
        return $("#frm").valid();
    };

    function get() {
        $.post("Member/Handlers/Member_ConfigHandler.ashx?type=get", { MemberAccount: "<%= WebHelper.Get("MemberAccount") %>" }, function (data) {
                $('#frm').fill(data);
            }, 'json');
        }

        $(function () {
            $("#frm").validate({
                errorElement: "span"
            });

            get();

            $("#frm").ajaxForm({
                dataType: 'json',
                beforeSubmit: function (arr, $form, options) {
                    if (flag) {
                        return false;
                    }
                    else {
                        flag = true;
                        return true;
                    }
                },
                success: function (data) {
                    if (data.isSuccess) {
                        loadPage("Member/Member_ConfigList.aspx");
                    }
                    else {
                        $(".alert > .content").html(data.message);
                        $(".alert").show();
                    }
                    flag = false;
                }
            });

            $("#btnCancel").click(function () {
                loadPage("Member/Member_ConfigList.aspx");				
            });
        });

</script>